package com.itheima.homework.集合加强;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

public class Demo1 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>(List.of( "a","f","b","c","a","d"));
        HashSet<String> set=new HashSet<>();
        for (String s : list) {
            set.add(s);
        }
        set.forEach(s -> System.out.println(s));
    }
}
